package net.huashitong.ssydt.article.entity.vo;

import io.swagger.annotations.ApiModelProperty;
import net.huashitong.ssydt.article.entity.SsArticleArticle;

import java.io.Serializable;

/**
 * @author <a href="mailto:yhy23456@163.com">huiyang.yu</a>
 * @since 2017.09.21
 */
public class ArticleBottomVO implements Serializable {

    private static final long serialVersionUID = -2946361766018868238L;
    @ApiModelProperty("文章id")
    private Long id;//文章id
    @ApiModelProperty("点赞数")
    private Integer praiseNumber;//点赞数
    @ApiModelProperty("评论数")
    private Integer commentNumber;//评论数
    @ApiModelProperty("是否收藏")
    private boolean collection;//是否收藏
    @ApiModelProperty("是否点赞")
    private boolean praise;//是否点赞
    @ApiModelProperty("练习权限，true 有权限")
    private boolean testAuthorization;

    public ArticleBottomVO(SsArticleArticle ssArticleArticle, Integer commentsNumber) {
        this.id = ssArticleArticle.getId();
        this.praiseNumber = ssArticleArticle.getPraiseNumber();
        this.commentNumber = commentsNumber;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Integer getPraiseNumber() {
        return praiseNumber;
    }

    public void setPraiseNumber(Integer praiseNumber) {
        this.praiseNumber = praiseNumber;
    }

    public Integer getCommentNumber() {
        return commentNumber;
    }

    public void setCommentNumber(Integer commentNumber) {
        this.commentNumber = commentNumber;
    }

    public boolean isCollection() {
        return collection;
    }

    public void setCollection(boolean collection) {
        this.collection = collection;
    }

    public boolean isPraise() {
        return praise;
    }

    public void setPraise(boolean praise) {
        this.praise = praise;
    }

    public boolean isTestAuthorization() {
        return testAuthorization;
    }

    public void setTestAuthorization(boolean testAuthorization) {
        this.testAuthorization = testAuthorization;
    }
}
